package com.heima.article.controller.v1;


import com.heima.article.service.ApCollectionBehaviorService;
import com.heima.model.article.dtos.CollectionBehaviorDto;
import com.heima.model.common.dtos.ResponseResult;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/api/v1/")
@RequiredArgsConstructor
public class ApCollectionBehaviorController {

    //
    private final ApCollectionBehaviorService apCollectionBehaviorService;

    /**
     * 收藏与取消收藏
     *
     * @return
     */
    @PostMapping("/collection_behavior")
    public ResponseResult collectionBehavior(@RequestBody CollectionBehaviorDto likesBehaviorDto){

        log.info("收藏与取消收藏");

        return apCollectionBehaviorService.collectionBehavior(likesBehaviorDto);
    }






}
















